#!/bin/sh

INIT_SCRIPT="`pwd`/__mysql.init"

DB_SERVERS="main entry django"

for i in ${DB_SERVERS}
do
	[ $1 == "start" ] && [ -S $i/data/mysql.sock ] || (cd $i; ${INIT_SCRIPT} $1)
	[ $1 == "stop" ]  && [ -S $i/data/mysql.sock ] && (cd $i; ${INIT_SCRIPT} $1)
done

exit 0

